home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / ODSessn.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  4.4 KB  |  209 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: ODSessn.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODSession_xh
  18. #define SOM_ODSession_xh
  19.  
  20. class ODSession;
  21.  
  22. #define ODSession_MajorVersion 1
  23. #define ODSession_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_ODBaseSession_xh
  31. #include <ODSessnB.xh>
  32. #endif
  33.  
  34. #ifndef ODSession_API
  35. #define ODSession_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class SOMClass;
  44. class SOMObject;
  45. class ODFrame;
  46. class ODFacet;
  47. class ODObject;
  48. class ODExtension;
  49. class ODBaseSession;
  50. class ODWindowState;
  51. class ODDispatcher;
  52. class ODArbitrator;
  53. class ODStorageSystem;
  54. class ODClipboard;
  55. class ODDragAndDrop;
  56. class ODLinkManager;
  57. class ODNameSpaceManager;
  58. class ODMessageInterface;
  59. class ODNameResolver;
  60. class ODTranslation;
  61. class ODUndo;
  62. class ODSemanticInterface;
  63. class ODBinding;
  64. class ODInfo;
  65. class ODSession;
  66.  
  67. /*
  68.  * End of user-defined types.
  69.  */
  70.  
  71. #ifdef OLDIBMSOMAPISUPPORT
  72. #define ODSessionCClassData ODSessionClassData
  73. #define ODSessionNewClass(major,minor) somNewVersionedClassReference(ODSession,major,minor)
  74. #endif
  75.  
  76. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  77. #define ODSessionMetaClass SOMClass
  78.  
  79. #if PRAGMA_ALIGN_SUPPORTED
  80. #  pragma options align=power
  81. #endif
  82.  
  83. /* The API to the ODSession class object, and the methods it introduces. */
  84. SOMEXTERN struct ODSessionClassDataStructure {
  85. #ifdef OLDIBMSOMAPISUPPORT
  86.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  87. #else
  88.     long zero;
  89. #endif
  90.     somStaticClassInfo *sci;
  91.     somDToken        instanceDataToken;
  92.     long reserved [3];
  93.     somMToken UniqueUpdateID;
  94.     somMToken GetUserName;
  95.     somMToken InitSession;
  96. } SOMDLINK ODSessionClassData;
  97.  
  98. #if PRAGMA_ALIGN_SUPPORTED
  99. #  pragma options align=reset
  100. #endif
  101.  
  102. #if !defined(ODSession_Class_Source) && !defined(SOM_Module_odsessn_Source)
  103. #if PRAGMA_IMPORT_SUPPORTED
  104. #pragma import list ODSessionClassData
  105. #endif
  106. #endif
  107.  
  108.  
  109. /*
  110.  * -- Typedefs and inline method declarations for left path inherited methods
  111.  * -- are omitted because this compilation had -museinheritedmethods in effect
  112.  */
  113.  
  114.  
  115. /*
  116.  * -- Typedefs for ODSession Method Procedures
  117.  */
  118. SOMEXTERN {
  119. typedef void   (* SOMLINK somTD_ODSession_InitSession)(ODSession *somSelf, Environment *ev);
  120. typedef void   (* SOMLINK somTD_ODSession_GetUserName)(ODSession *somSelf, Environment *ev,
  121.         ODIText* name);
  122. typedef ODUpdateID   (* SOMLINK somTD_ODSession_UniqueUpdateID)(ODSession *somSelf, Environment *ev);
  123. }
  124.  
  125. #endif /* ODSession_API */
  126.  
  127.  
  128. /*
  129.  * -- This emitter treats Method Tokens as Thunks by default.
  130.  * -- Use the sc modifier "nothunks" to change this default
  131.  */
  132. #undef somresolve_
  133. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  134.  
  135. /*
  136.  * -- The C++ Wrapper Class for ODSession
  137.  */
  138. class ODSession : public ODBaseSession
  139. {
  140. public:
  141.  
  142. // ODSession::new registers use of the class object, and then uses somNew
  143. // to allocate memory and load the object method table pointer. 
  144. void *operator new(size_t size)
  145. {
  146.     SOM_IgnoreWarning(size);
  147.     // Allocate memory using the default allocator for ODSession, and
  148.     // clear mem & set method table pointer, call basic initialization
  149. #ifdef SOMCHKNULL
  150.     void * __somResult = (void *)
  151.       somNewObject(ODSession);
  152.     SOMCHKNULL(__somResult);
  153.     return __somResult;
  154. #else
  155.     return (void*) somNewObject(ODSession);
  156. #endif
  157. }
  158.  
  159. // ODSession::delete uses the default deallocator for the object's class.
  160. void operator delete(void * obj)
  161. {
  162.     if (obj) {
  163.         SOM_Resolve(obj,SOMObject,somFree)
  164.            ( (SOMObject*) obj );
  165.     }
  166. }
  167.  
  168. /* method: InitSession */
  169. void   InitSession(Environment *ev)
  170. {
  171.    SOM_ResolveD(this,ODSession,ODSession,InitSession)
  172.     (this,ev);
  173. #ifdef SOMCHKEXCEPT
  174.       SOMCHKEXCEPT;
  175. #endif
  176. }
  177.  
  178. /* method: GetUserName */
  179. void   GetUserName(Environment *ev,
  180.         ODIText* name)
  181. {
  182.    SOM_ResolveD(this,ODSession,ODSession,GetUserName)
  183.     (this,ev,name);
  184. #ifdef SOMCHKEXCEPT
  185.       SOMCHKEXCEPT;
  186. #endif
  187. }
  188.  
  189. /* method: UniqueUpdateID */
  190. ODUpdateID   UniqueUpdateID(Environment *ev)
  191. {
  192.    #ifdef SOMCHKEXCEPT
  193.    ODUpdateID __somResult = 
  194.       SOM_ResolveD(this,ODSession,ODSession,UniqueUpdateID)
  195.     (this,ev);
  196.       SOMCHKEXCEPT;
  197.    return __somResult;
  198. #else
  199.    return SOM_ResolveD(this,ODSession,ODSession,UniqueUpdateID)
  200.     (this,ev);
  201. #endif
  202. }
  203.  
  204. };   /* ODSession */
  205.  
  206.  
  207.  
  208. #endif       /* SOM_ODSession_xh */
  209.